package com.wsj.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.wsj.dao.IBmClassTypeDao;
import com.wsj.service.IBmClassTypeServ;
import com.wsj.util.exception.BusinessException;
import com.wsj.util.page.PageResultSet;
import com.wsj.web.vo.homeSite.BmClassType;

public class BmClassTypeServImpl implements IBmClassTypeServ {
	private IBmClassTypeDao bmClassTypeDaoImpl;

	public boolean add(BmClassType bmClassType) throws BusinessException {
		// TODO Auto-generated method stub
		this.bmClassTypeDaoImpl.add(bmClassType);
		return true;

	}

	public boolean delete(Integer id) throws BusinessException {
		// TODO Auto-generated method stub
		this.bmClassTypeDaoImpl.delete(id);
		return true;

	}

	public BmClassType getBmClassTypeByClassTypeName(String classTypeName)
			throws BusinessException {
		// TODO Auto-generated method stub
		BmClassType bmClassType=this.bmClassTypeDaoImpl.getBmClassTypeByClassTypeName(classTypeName);
		return bmClassType;
	}

	public BmClassType getBmClassTypeById(Integer id) throws BusinessException {
		// TODO Auto-generated method stub
		BmClassType bmClassType=this.bmClassTypeDaoImpl.getBmClassTypeById(id);
		return bmClassType;
	}

	public boolean update(BmClassType bmClassType) throws BusinessException {
		// TODO Auto-generated method stub
		this.bmClassTypeDaoImpl.update(bmClassType);
		return true;

	}

	public IBmClassTypeDao getBmClassTypeDaoImpl() {
		return bmClassTypeDaoImpl;
	}

	public void setBmClassTypeDaoImpl(IBmClassTypeDao bmClassTypeDaoImpl) {
		this.bmClassTypeDaoImpl = bmClassTypeDaoImpl;
	}

	public PageResultSet loadBmClassTypeByParam(String classTypeName, int page, int pageSize) throws BusinessException {
		// TODO Auto-generated method stub
		PageResultSet pageResultSet=this.bmClassTypeDaoImpl.loadBmClassTypeByParam(classTypeName,page,pageSize);
		
		return pageResultSet;
	}

	public List loadAllBmClassType() throws BusinessException {
		// TODO Auto-generated method stub
		List list=new ArrayList();
		list=this.bmClassTypeDaoImpl.loadAllBmClassType();
		return list;
	}

}
